import request from '@/utils/request'

// 查询采购临时计划列表
export function listNcPurchaseTemporaryPlan(query) {
  return request({
    url: '/sales/NcPurchaseTemporaryPlan/list',
    method: 'get',
    params: query
  })
}
// 查询采购临时计划列表
export function listNcPurchaseTemporaryPlanSelect(query) {
  return request({
    url: '/sales/NcPurchaseTemporaryPlan/listSelect',
    method: 'get',
    params: query
  })
}
export function getNcPurchaseTemporaryPlanByPlanNumber(query) {
  return request({
    url: '/sales/NcPurchaseTemporaryPlan/getNcPurchaseTemporaryPlanByPlanNumber',
    method: 'get',
    params: query
  })
}

// 查询采购临时计划详细
export function getNcPurchaseTemporaryPlan(id) {
  return request({
    url: '/sales/NcPurchaseTemporaryPlan/' + id,
    method: 'get'
  })
}

// 新增采购临时计划
export function addNcPurchaseTemporaryPlan(data) {
  return request({
    url: '/sales/NcPurchaseTemporaryPlan',
    method: 'post',
    data: data
  })
}

// 修改采购临时计划
export function updateNcPurchaseTemporaryPlan(data) {
  return request({
    url: '/sales/NcPurchaseTemporaryPlan',
    method: 'put',
    data: data
  })
}

// 删除采购临时计划
export function delNcPurchaseTemporaryPlan(id) {
  return request({
    url: '/sales/NcPurchaseTemporaryPlan/' + id,
    method: 'delete'
  })
}
